const sessionManager = () => {
  let token = '';
  let tmpToken = '';
  return {
    get: () => token || sessionStorage.getItem('session') || '',
    set: (val: string) => {
      token = val;
      sessionStorage.setItem('session', val);
    },
    getTmp: () => tmpToken || sessionStorage.getItem('tmpSession') || '',
    setTmp: (val: string) => {
      tmpToken = val;
      sessionStorage.setItem('tmpSession', val);
    },
  };
}
export default sessionManager;
